package InterfaceTest;

/**
 * TriCycle Cycle的实现子类
 *
 * @author ASUS
 * @version OpenJDK 11
 */
public class TriCycle implements Cycle {
  /** count 表示存在/运行激活的数量 */
  private static int count = 0;

  /**
   * doCycle <br>
   * 打印对象信息和激活数量
   */
  @Override
  public void doCycle() {
    count++;
    System.out.println("TriCycle");
    System.out.printf("There are %d TriCycle\n", count);
  }

  /**
   * deCycle <br>
   * 将一个对象去除，输出剩余数量
   */
  @Override
  public void deCycle() {
    count--;
    System.out.printf("There are %d TriCycle\n", count);
  }
}
